<template>
	<view class="wrapper">
		<view class="bg-f6"></view>
		<view class="item flex flex-ai-c" v-show="type === '0'">
			<text class="item-left color-999">车架号</text>
			<text class="item-right color-333 flex-1">{{vin}}</text>
		</view>
		<view class="item flex flex-ai-c" v-show="type === '0'">
			<text class="item-left color-999">车型</text>
			<text class="item-right color-333">{{carName}}</text>
		</view>
		<view class="item flex flex-ai-c" v-show="type === '1'">
			<text class="item-left color-999">车牌号</text>
			<text class="item-right color-333">{{number}}</text>
		</view>
		<view class="tip">*最新车型数据可能还未搜录，建议手动添加</view>
		<view class="btn">
			<button class="btn-primary" @click='confirm'>确定</button>
		</view>
		
	</view>
</template>
<script>
export default {
	data(){
		return {
			type: '0', //0 vin 1 车牌号
			vin: 'LEBMAJAFCJ123466787872',//
			number: '', //车牌号,
			carName: '北京奔弛 G63 1.6T 2020时尚尊贵版', //车型
		}
	},

	onNavigationBarButtonTap(){
    uni.navigateTo({
        url: '/pages_common/pages_index/scan/scan'
      })
	},
	
	onLoad(e){
		this.type = e.type ? e.type : '0';
		if(e.type === '1'){ //扫描车牌结果
			uni.setNavigationBarTitle({
				title: '车牌识别'
			});
		}
	},

	methods: {
		confirm(){
			uni.navigateBack();
		}
	}

}
</script>
<style lang="scss" scoped>
page {
	background: #fff;
}
	.wrapper {
		padding: 20rpx 0 ;


		.bg-f6 {
			height: 20rpx;
			background: #f6f6f6;
		}

		.item {
			margin: 0 44rpx;
			border-bottom: 2rpx solid #eee;
			font-size: 28rpx;
			font-weight: 500;
			height: 100rpx;
			background: #fff;

			&:last-child {
				border-bottom: none;
			}

			.item-left {
				width: 200rpx;
			}
		}

		.tip {
			font-size: 24rpx;
			font-weight: 500;
			color: #999999;
			padding: 28rpx 44rpx;
		}

		.btn {
			position: fixed;
			bottom: 0;
			width: 100%;
		}
	}

	/deep/ uni-button:after{
		border:none;
	} 
</style>